import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: AliceMana
 * Date: 2022-10-24
 * Time: 18:18
 */
public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Set<String> set = new HashSet<>();
        int count = 0;
        while (in.hasNext()) {
            String s = in.nextLine();
            String[] arr = s.split(" ");
            for (String value : arr) {
                if (set.add(value)) {
                    count++;
                }
            }
        }
        System.out.println(count);
    }

    public static int fib(int n) {
        if (n == 0) {
            return 0;
        }
        if (n == 1 || n == 2) {
            return 1;
        }
        return fib(n-1) + fib(n-2);
    }

    public static void main1(String[] args) {
        int[] arr = new int[31];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = fib(i);
        }
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int count = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] <= n && arr[i+1] >= n) {
                count = Math.min(n-arr[i], arr[i+1]-n);
            }
        }
        System.out.println(count);
    }
}
